home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / web / cweb.lha / cweb / Makefile < prev    next >
Makefile  |  1990-07-13  |  1KB  |  66 lines

  1. # Copyright (C) 1987 Princeton University
  2.  
  3. # This file is part of CWEB.
  4. # This program by Silvio Levy is based on a program by D. E. Knuth.
  5. # It is distributed WITHOUT ANY WARRANTY, express or implied.
  6. # $Revision 1.1$ -- Dec 1987
  7.  
  8. MACROSDIR= /usr/lib/tex/macros
  9. DESTDIR= /usr/local/bin/
  10. DESTPREF=
  11. WEAVE = ./weave
  12. TANGLE = ./tangle
  13. SOURCES = weave.web common.web tangle.web
  14. ALMOSTALL =  common.web tangle.web Makefile README common.c common.h tangle.c \
  15.     webman.tex cwebmac.tex examples vms.ch
  16. ALL =  $(ALMOSTALL) weave.web
  17. CFLAGS = -O
  18.  
  19. .SUFFIXES: .tex .dvi .web .print
  20.  
  21. .web.tex:
  22.     $(WEAVE) $*
  23.  
  24. .tex.dvi:    
  25.     tex $*
  26.  
  27. .web.dvi:
  28.     $(WEAVE) $*
  29.     tex $*
  30.  
  31. .web.c:
  32.     $(TANGLE) $*
  33.  
  34. .web.o:
  35.     make $*.c
  36.     make $*.o
  37.  
  38. .dvi.print:
  39.     qpr -x $*.dvi
  40.  
  41. all: tangle weave
  42.  
  43. tangle: tangle.o common.o
  44.     cc $(CFLAGS) -o tangle tangle.o common.o 
  45.  
  46. weave: weave.o common.o
  47.     cc $(CFLAGS) -o weave weave.o common.o
  48.  
  49. doc: $(SOURCES)
  50.     for i in $?; do make `echo $$i | sed "s/web$$/dvi/"`; done
  51.     @touch doc
  52.  
  53. #leave *.c
  54. clean:
  55.     rm -f -r *.o common.tex weave.tex weave.c tangle.tex *.log *.dvi core weave.web.[12] cweb.*
  56.  
  57. install: all
  58.     mv weave $(DESTDIR)$(DESTPREF)weave
  59.     mv tangle $(DESTDIR)$(DESTPREF)tangle
  60.     cp cwebmac.tex $(MACROSDIR)
  61.  
  62. bundle: $(ALL)
  63.     sed -n '1,1500 p' weave.web > weave.web.1
  64.     sed -n '1501,$$ p' weave.web > weave.web.2
  65.     /n/fine/usr/local/bin/shar -m100000 -c -v -f cweb $(ALMOSTALL) weave.web.[12]
  66.